<include file="Public:header" />
{// 引入标签库 }
<tagLib name="html" />
<script language="javascript">
	function rechargeLog(){
		location.href = APP+"/Paylog/payLog/payType/0/cardId/"+$F('cardId')+"/ddd";
	}
	function checkIn(){
		if($F('chestId')==''){
			alert('请填写临时租柜号');
			return false;
		}
		location.href = APP+"/Inlog/in/cardId/"+$F('cardId')+"/chestId/"+$F('chestId')+"/memberId/"+$F('memberId')+"/ffff";
		//ThinkAjax.send('__URL__/checkAccount/','ajax=1&account='+$F('account'));
	}

	function checkOut(logid){
		location.href = APP+"/Inlog/out/logId/"+logid+"/ffff";
	}
	function recharge(){
		location.href = APP+"/Paylog/add/cardId/"+$F('cardId')+"/d ddd";
	}
	function consumeLog(){
		location.href = APP+"/Paylog/payLog/payType/1/cardId/"+$F('cardId')+"/fff";
	}
	function inlog(id){
		location.href = APP+"/Inlog/inlog/memberId/"+id+"/ffff";
	}

	function todayConsumelog(id){
		location.href = APP+"/Consumelog/todayConsumelog/memberId/"+id+"/fdfddf";
	}
	function addMember(cardSerial){
		if (cardSerial){
				 location.href  = URL+"/add/cardSerial/"+cardSerial+"/ffff";
		}else{
				 location.href  = URL+"/add/";
		}
	}

	//回车提交
function InputKeyPress(aFrmObj){
	var currKey=0,CapsLock=0;
	var e = arguments[1];
	e=e||window.event;
	var kCode=e.keyCode||e.which||e.charCode;
	if(kCode == '13'){
		if(!$('chestId').disabled){
				checkIn();
			}
	}
}

</script>
<div id="main" class="main" >
<div class="content">
<div class="title" style="text-align:center">[ <a href="__APP__/Public/main">返回首页</a> ][ <a href="__URL__">会员列表</a> ]
 <input type="button" value="新增会员" onclick="addMember('{$cardSerial}')" class="small button shadow">
 <input type="button" value="充 值" onclick="recharge()" class="small button shadow">
 <input type="button" value="今日消费" onclick="todayConsumelog({$member.id})" class="small button shadow">
 </div>
<table  class="list" cellpadding=0 cellspacing=0 align="center" width="98%">
<tr><td height="5" colspan="4" class="topTd" ></td></tr>
<if condition="$member">
<tr><th colspan="4">会员基本资料</th></tr>
<input type="hidden" name="memberId" id="memberId" value="{$member.id}">
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" width="25%">用户名：</td>
	<td class="tLeft" width="25%">{$member.account}</td>
	<td class="tRight" width="25%">真实姓名：</td>
	<td class="tLeft" width="25%">{$member.trueName}</td>
</tr>
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" >生日：</td>
	<td class="tLeft" >{$member.birthday}</td>
	<td class="tRight">性别：</td>
	<td class="tLeft" >
	<eq name="member.sex" value="0" >女</eq>
	 <eq name="member.sex" value="1" >男</eq>
	</td>
</tr>
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" >手机号码：</td>
	<td class="tLeft" >{$member.telephone}</td>
	<td class="tRight">状态：</td>
	<td class="tLeft">
		<eq name="member.status" value="1" >正常</eq>
		<eq name="member.status" value="0" >禁用</eq>
		</td>
</tr>
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight tTop">喜好：</td>
	<td class="tLeft">{$member.hobby}</td>
	<td class="tRight tTop">备注：</td>
	<td class="tLeft">{$member.remark}</td>
</tr>
<tr><th colspan="4">会员卡信息</th></tr>
<input type="hidden" name="cardId" id="cardId" value="{$card.id}">
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" >序列号：</td>
	<td class="tLeft" >{$card.cardSerial}</td>
	<td class="tRight" >卡号：</td>
	<td class="tLeft" >{$card.cardNumber}</td>
</tr>
<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" >余额：</td>
	<td class="tLeft red" >￥{$card.money}</td>
	<td class="tRight" >赠送余额：</td>
	<td class="tLeft red" >￥{$card.extMoney}</td>

</tr>

<tr class="row" onmouseover="over(event)" onmouseout="out(event)">
	<td class="tRight" >有效期：</td>
	<td class="tLeft" >{$card.startDate} 至 {$card.endDate}</td>
	<td class="tRight" >销售顾问：</td>
	<td class="tLeft" >{$card.salerName}</td>
</tr>

<tr><th colspan="4">今日消费</th></tr>

<tr>
	<td class="tCenter bold" >消费金额</td>
	<td class="tCenter bold" >付款方式</td>
	<td class="tCenter bold" >备注</td>
	<td class="tCenter bold" >消费时间</td>
</tr>

<volist name="paylog" id="pl">
	<tr>
		<td class="tCenter" >{$pl.money}</td>
		<td class="tCenter" ><if condition="$pl.addType eq 1 ">刷卡<else />现金</if> </td>
		<td class="tCenter" >{$pl.remark}</td>
		<td class="tCenter" >{$pl.payTime|date="H:i:s",###}</td>
	</tr>
</volist>

<else/>
<tr class="row" onmouseover="over(event)" onmouseout="out(event)"><th colspan="4">暂无会员信息,请添加^_^</th></tr>
</if>
<tr><td height="5" colspan="4" class="bottomTd"></td></tr>
</table>
<div class="title" style="text-align:center">

	<input type="button" value="消费记录" onclick="consumeLog()" class="small button shadow">
	<input type="button" value="充值记录" onclick="rechargeLog()" class="small button shadow">
	<input type="button" value="入场记录" onclick="inlog({$member.id})" class="small button shadow">

	<if condition="$inlog neq ''" >
		临时租柜号:<input type="text" value="{$inlog.chestId}" id="chestId" name="chestId" disabled class="small input shadow">
		<input type="button" value="离 场" onclick='checkOut({$inlog.id})'  onkeyup='checkOut({$inlog.id})' class="small button shadow">
	<else/>
	临时租柜号:<input type="text" value="" id="chestId" name="chestId" class="small input shadow">
	<input type="button" value="入 场" onclick='checkIn()'  class="small button shadow">
	</if>

<input type="button" value="清单" onclick="window.open('__APP__/Print/index/cardId/{$card.id}/fff','new','height=300,width=250,top=250,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no,status=no')
;" class="small button shadow" />
<input type="button" value="所有清单" onclick="window.open('__APP__/Print/allList/cardId/{$card.id}/fff','new','height=300,width=250,top=250,left=300,toolbar=no,menubar=no,scrollbars=no, resizable=yes,location=no,status=no')
;" class="small button shadow" />
</div>
</div>
</div>